home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
optivc16
/
vgraph.h
< prev
next >
Wrap
C/C++ Source or Header
|
1999-03-06
|
20KB
|
424 lines
/* Vgraph.h
graphics functions for all floating-point and integer vector types
Copyright (c) 1996-1999 by Martin Sander
All Rights Reserved.
*/
#ifndef __VGRAPH_H
#define __VGRAPH_H
#if !defined( __VECLIB_H )
#include <VecLib.h>
#endif
#if defined _WINDOWS || defined _Windows
#if defined _MSC_VER || defined __BORLANDC__
/* <windows.h> or the MFC, OWL, OCF files must be included before <VGraph.h> ! */
#else /* that means: Optima++ */
#include <WCanvas.hpp>
#include <WColor.hpp>
#define COLORREF WColor
#endif
#else
#if defined( __WINDOWS_H )
#error <windows.h> must not be included, if program will run under DOS!
#endif
#include <graphics.h>
#define COLORREF unsigned /* in <windows.h> defined as DWORD! */
#endif
#ifdef __cplusplus
extern "C" {
#endif
/******************** Plot-Routines **************************/
#if defined _WINDOWS || defined _Windows
#if defined __BORLANDC__ || defined _MSC_VER
void __vf V_initPlot( HWND vhwnd, HDC vdc );
void __vf V_initPrint( HDC vprintdc );
#else /* Optima++ */
void __vf V_initPlot( WCanvas _VFAR *vcanv );
void __vf V_initPrint( WPrinterCanvas _VFAR *vcanvas );
#endif
#else /* DOS: use Borland's BGI */
void __vf V_initGraph( char _VFAR *pathtodriver );
void __vf V_initPlot( int graphmode );
#endif
void __vf V_setPlotRegion( int left, int top, int right, int bottom );
void __vf V_setSymbolSize( float symsize );
void __vf V_setLineThickness( unsigned thickness );
int __vf V_findAxisRange( extended _VFAR *LoX, extended _VFAR *HiX,
extended Xmin, extended Xmax );
void __vf V_findAxes( extended Xmin, extended Xmax,
extended Ymin, extended Ymax );
void __vf V_drawAxes( extended Xmin, extended Xmax,
extended Ymin, extended Ymax );
void __vf V_continuePlot( void );
#ifdef __BORLANDC__
#pragma option -a-
#else /* Visual C++ */
#pragma pack( push,1 )
#endif /* avoid insertion of dummy bytes */
typedef struct {
int left, top, right, bottom,
outleft, outtop, outright, outbottom,
nPixx, nPixy,
xclipu, xclipl, yclipu, yclipl,
cs, cl, cdot;
unsigned linethickness, symlinethickness, DangerOver;
float symbolsize, x_scale, y_scale;
extended x_max, x_min, x_range, x_maxoverrange,
y_max, y_min, y_range, y_maxoverrange;
} VCOORDSYSTEM;
#ifdef __BORLANDC__
#pragma option -a.
#else /* Visual C++ */
#pragma pack( pop )
#endif /* restore default data packing */
void __vf V_setCoordSystem( VCOORDSYSTEM _VFAR *xcs );
void __vf V_getCoordSystem( VCOORDSYSTEM _VFAR *xcs );
void __vf VF_xyAutoPlot( fVector X, fVector Y, ui size,
unsigned form, COLORREF color );
void __vf VF_xy2AutoPlot( fVector X1, fVector Y1, ui size1,
unsigned form1, COLORREF color1,
fVector X2, fVector Y2, ui size2,
unsigned form2, COLORREF color2 );
void __vf VF_xyDataPlot( fVector X, fVector Y, ui size,
unsigned form, COLORREF color );
void __vf VF_yAutoPlot( fVector Y, ui size,
unsigned form, COLORREF color );
void __vf VF_y2AutoPlot( fVector Y1, ui size1,
unsigned form1, COLORREF color1,
fVector Y2, ui size2,
unsigned form2, COLORREF color2 );
void __vf VF_yDataPlot( fVector Y, ui size,
unsigned form, COLORREF color );
void __vf VCF_autoPlot( cfVector X, ui size,
unsigned form, COLORREF color );
void __vf VCF_2AutoPlot( cfVector X1, ui size1,
unsigned form1, COLORREF color1,
cfVector X2, ui size2,
unsigned form2, COLORREF color2 );
void __vf VCF_dataPlot( cfVector X, ui size,
unsigned form, COLORREF color );
void __vf VD_xyAutoPlot( dVector X, dVector Y, ui size,
unsigned form, COLORREF color );
void __vf VD_xy2AutoPlot( dVector X1, dVector Y1, ui size1,
unsigned form1, COLORREF color1,
dVector X2, dVector Y2, ui size2,
unsigned form2, COLORREF color2 );
void __vf VD_xyDataPlot( dVector X, dVector Y, ui size,
unsigned form, COLORREF color );
void __vf VD_yAutoPlot( dVector Y, ui size,
unsigned form, COLORREF color );
void __vf VD_y2AutoPlot( dVector Y1, ui size1,
unsigned form1, COLORREF color1,
dVector Y2, ui size2,
unsigned form2, COLORREF color2 );
void __vf VD_yDataPlot( dVector Y, ui size,
unsigned form, COLORREF color );
void __vf VCD_autoPlot( cdVector X, ui size,
unsigned form, COLORREF color );
void __vf VCD_2AutoPlot( cdVector X1, ui size1,
unsigned form1, COLORREF color1,
cdVector X2, ui size2,
unsigned form2, COLORREF color2 );
void __vf VCD_dataPlot( cdVector X, ui size,
unsigned form, COLORREF color );
#ifdef __BORLANDC__ /* 80-bit IEEE numbers supported.
The following lines apply
only to Borland C++ */
void __vf VE_xyAutoPlot( eVector X, eVector Y, ui size,
unsigned form, COLORREF color );
void __vf VE_xy2AutoPlot( eVector X1, eVector Y1, ui size1,
unsigned form1, COLORREF color1,
eVector X2, eVector Y2, ui size2,
unsigned form2, COLORREF color2 );
void __vf VE_xyDataPlot( eVector X, eVector Y, ui size,
unsigned form, COLORREF color );
void __vf VE_yAutoPlot( eVector Y, ui size,
unsigned form, COLORREF color );
void __vf VE_y2AutoPlot( eVector Y1, ui size1,
unsigned form1, COLORREF color1,
eVector Y2, ui size2,
unsigned form2, COLORREF color2 );
void __vf VE_yDataPlot( eVector Y, ui size,
unsigned form, COLORREF color );
void __vf VCE_autoPlot( ceVector X, ui size,
unsigned form, COLORREF color );
void __vf VCE_2AutoPlot( ceVector X1, ui size1,
unsigned form1, COLORREF color1,
ceVector X2, ui size2,
unsigned form2, COLORREF color2 );
void __vf VCE_dataPlot( ceVector X, ui size,
unsigned form, COLORREF color );
#else /* no 80-bit IEEE number support:
the following lines apply only to Visual C++ and Optima++ */
#define VE_xyAutoPlot VD_xyAutoPlot
#define VE_xy2AutoPlot VD_xy2AutoPlot
#define VE_xyDataPlot VD_xyDataPlot
#define VE_yAutoPlot VD_yAutoPlot
#define VE_y2AutoPlot VD_y2AutoPlot
#define VE_yDataPlot VD_yDataPlot
#define VCE_autoPlot VCD_autoPlot
#define VCE_2AutoPlot VCD_2AutoPlot
#define VCE_dataPlot VCD_dataPlot
#endif /* 80-bit real support */
void __vf VBI_xyAutoPlot( biVector X, biVector Y, ui bize,
unsigned form, COLORREF color );
void __vf VBI_xy2AutoPlot( biVector X1, biVector Y1, ui bize1,
unsigned form1, COLORREF color1,
biVector X2, biVector Y2, ui bize2,
un